1. Technical Field
The present invention relates in general to personal computer systems, and in particular to a method and system for recovering from a hard disk failure. More particularly, the present invention relates to setting up and executing a protected copy of a master boot record such that upon a booting failure, the system can be recovered without the need for an external bootable media.
2. Description of the Related Art
Personal computer systems are well known in the art. Personal computer systems in general, and IBM Personal Computers in particular, have attained widespread use of providing computing capacity throughout modern society. A personal computer can typically be defined as a desktop, floor standing, or a portable microcomputer that is comprised of a system unit having a single central processing unit (CPU) and associated volatile and non-volatile memory, including random access memory (RAM) and Basic Input Output System (BIOS) flash memory, a video display controller, a video display terminal (also known as a “system monitor”), a keyboard, one or more diskette drives, a fixed storage device (also known as a “hard drive”), a pointer device, and an optional printer. One of the distinguishing characteristics of these systems is the use of a system planar or “motherboard” to electrically connect the constituent components together. Personal computers are designed primarily to supply independent computing power to a single user and are inexpensively priced for purchase by individuals or small businesses. An exemplary personal computer system is IBM's Netvista A40.
When a user activates a computer power switch, or presses a reset button, the computer “boots” itself. Booting initiates an automatic start program routine that clears memory, executes diagnostics, loads a computer operating system software program into memory from hard disk storage or other storage devices such as CD ROM, and executes other well known routines that prepare the computer for operation.
In personal computers that are compatible with the IBM PERSONAL COMPUTER, the automatic start program includes a set of programs called BIOS that are encoded in flash memory. The BIOS facilitates the transfer of data and instructions between a CPU and peripheral devices such as disk drives. Computer systems are designed to perform functional tests from the BIOS every time the computer is turned on.
Preferably, the bootstrap program initializes all aspects of the data processing system, from CPU registers to device controllers to memory contents. The bootstrap program must know how to load an operating system and to start execution of the operating system. To load the operating system, the bootstrap program typically locates an operating system kernel, stored within a hard disk, loads the operating system kernel, and transfers control to an initial address provided by the operating system kernel. Typically, the operating system is loaded into RAM within the data processing system. Once loaded and initialized, the operating system controls the execution of programs and may provide services such as resource allocation, scheduling, input/output control, and data management. The operating system also determines the graphical user interface (GUI) provided for displaying data.
In most data processing systems, the bootstrap program is stored in two places. First, part of the bootstrap program may be stored in flash memory. The flash memory is an ideal memory location because it does not require initialization and is always available. However, the part of the bootstrap program stored in flash memory does not include configuration data. The configurable aspects of the bootstrap program are preferably stored at a fixed memory location available to the data processing system. A central component of the configurable aspects of booting is known as the master boot record (MBR). The MBR includes a small program that is executed when a computer boots up. Typically, the MBR resides on the first sector of the hard disk. The program begins the boot process by looking up the partition table to determine which partition to use for booting. It then transfers program control to the boot sector of that partition, which continues the boot process. An MBR virus is a common type of virus that replaces the MBR with an invalid code. Since the MBR executes every time a computer is started or reset, this type of virus is extremely dangerous. MBR viruses may enter a system through a removable diskette, a modem, or a network interface.
The MBR includes information that identifies how and where an operating system is located on the hard disk such that the operating system can be booted (loaded) into the computer's main memory. The MBR is sometimes referred to as the “partition sector” or the “master partition table” because it includes a table that identifies the location of each partition that has been formatted onto the hard disk. In addition to the partition table, the MBR also includes a program that reads the boot sector record of the partition containing the operating system to be booted into system memory. In turn, that record contains a program that loads the rest of the operating system into system memory. The information contained within the MBR is critical because without it the system cannot access and load the operating system and would be non-functional. Once a virus destroys this information it is not possible to utilize the system unless an alternate boot record is available.
Removable storage media such as diskettes or CD ROMs are conventionally utilized to store a copy of the MBR that may be restored in case of a boot failure. Such a method relies, however, on the diligence of an individual to maintain and keep track of backup diskettes and is therefore inconvenient and potentially unreliable and may also be subject to MBR viruses if the object diskette has been utilized within an infected system. In addition, maintaining an externally stored copy of the MBR is particularly difficult for handicapped persons having limited mobility.
It can therefore be appreciated that a need exists for an improved technique for ensuring that a viable backup copy of a master boot record is available in case of a failure of the primary copy on the hard disk. The present invention addresses such a need.